Skip to content

Fix gui test search box - #6

Merged
Maverick-F merged 3 commits into
mainfrom
fix_gui_test_search_box
Nov 10, 2026
Merged

Maverick-F merged 3 commits into
mainfrom
fix_gui_test_search_box

Conversation

@Maverick-F

Copy link
Copy Markdown
Contributor
  • 96ef36d Find the tool search box by its accessible name, not as the first text box (from 6962470)
  • b3d778a Run the pytest-qt tests off screen with an empty home folder of their own (from 91c8eed). The message says its test_tool_forms.py changes were left out and why.
  • 278fb03 Fix the two failing pytest-qt tests

…e first Edit

With the left side in splitters, UI Automation lists the tool form first, so the
window's first Edit was the form's input file box: select_tool typed tool names
there, the tree was never filtered, and tools outside the expanded Mapping
category weren't found. The search box now has the accessible name
"Search tools", and tool_search_box() finds it by that name.

From 6962470 in BERATool/beratools_full.
The pytest-qt tests showed their windows on the desktop, and used the user's saved
GUI settings in ~/.beratools: a saved value changed the forms they check, and the
tests wrote the settings back. conftest now gives them a temporary home folder
(USERPROFILE and HOME) and sets QT_QPA_PLATFORM to offscreen unless it is set,
before beratools.gui is imported.

From 91c8eed in BERATool/beratools_full, without its test_tool_forms.py changes:
the tests they touch aren't here, or already set their paths explicitly.
TestGroundFootprint::test_round_trip used the layer footprint_rel, which
tests/data/integration_aoi.gpkg doesn't have; it now uses footprint_abs.

TestToolHistoryPersistence::test_switch_away_and_back_restores_saved_parameter
saved a form whose required input and output files are empty, so
get_widgets_arguments() returned None and the patched add_tool_history failed.
Only the numeric round trip is under test, so it reads the raw values with
get_widgets_values() instead, as in beratools_full.
@Maverick-F
Maverick-F marked this pull request as ready for review November 10, 2026 20:03
@Maverick-F
Maverick-F merged commit 91ea3fa into main Nov 10, 2026
1 check passed
@Maverick-F
Maverick-F deleted the fix_gui_test_search_box branch November 10, 2026 20:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant